//
//  ViewController.m
//  离线断点下载_NSURLSeesion
//
//  Created by Guo Rui on 2017/9/7.
//  Copyright © 2017年 GR Harry. All rights reserved.
//

#import "ViewController.h"
#import "TFDownloadFileOperation.h"

@interface ViewController ()
@property (strong, nonatomic) TFDownloadFileOperation *operation;
@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    TFDownloadFileOperation *operation = [[TFDownloadFileOperation alloc] initWithDownloadUrl:@"http://120.25.226.186:32812/resources/videos/minion_02.mp4"];
    self.operation = operation;
}

- (IBAction)startBtnClick:(id)sender {
   [self.operation start];
}
- (IBAction)pauseBtnClick:(id)sender {
    [self.operation pause];
}
- (IBAction)cacelBtnClick:(id)sender {
    [self.operation cancel];
}
- (IBAction)resumeBtnClick:(id)sender {
    [self.operation resume];
}

@end
